package es.cea.web;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class EditarLibro
 */
@WebServlet("/EditarLibro")
public class EditarLibro extends HttpServlet {
	private static final long serialVersionUID = 1L;

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		PrintWriter pw=response.getWriter();
		pw.print("<html><head></head><body>");
		pw.print("<h1 align='center'>Detalle de libros</h1><hr><br><h2 align='center'>");
		pw.print("<form action='LibroEditProcess' method='get'>");
		pw.print("ID: "+request.getParameter("id") +"<br>");
		pw.print("<input type='hidden' name='id' value='"+request.getParameter("id") +"'> ");
		pw.print("Titulo: <input type='text' name='titulo' value='"+ request.getParameter("titulo") +"'><br>");
		pw.print("Fecha: <input type='text' name='fecha' value='"+ request.getParameter("fecha") +"'><br>");
		pw.print("Autor: "+ request.getParameter("autor") +"><br><br>");
		pw.print("<input type='submit' value='Modificar'><br></form>");
		
		pw.print("<a href='ListadoLibros'>volver</a><br>");
		pw.println("</a></body></html>");
    	pw.close();
    
	}

}
